<%@ page language="java" pageEncoding="UTF-8" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<t:master>
	<jsp:attribute name="customfootjs">
	<script src="${pageContext.request.contextPath}/assets/lib/jqueryui/jquery-ui.min.js"></script>
    <script src="${pageContext.request.contextPath}/assets/lib/validationengine/js/jquery.validationEngine.js"></script>
    <script src="${pageContext.request.contextPath}/assets/lib/validationengine/js/languages/jquery.validationEngine-en.js"></script>
    <script src="${pageContext.request.contextPath}/assets/lib/jquery-validation-1.11.1/dist/jquery.validate.min.js"></script>
    <script src="${pageContext.request.contextPath}/assets/lib/jquery-validation-1.11.1/localization/messages_ja.js"></script>
    <script>
        $(function () {
            formValidation();
        });
    </script>
	</jsp:attribute>

	<jsp:attribute name="customheadcss">
	 <link rel="stylesheet"
           href="${pageContext.request.contextPath}/assets/lib/validationengine/css/validationEngine.jquery.css">
     <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/lib/jqueryui/jquery-ui.css">
	</jsp:attribute>

    <jsp:body>
        <div class="row">
            <style>
                .form-control.col-lg-6 {
                    width: 50% !important;
                }
            </style>


            <form:form commandName="resource">
                <form:errors path="*" cssStyle="color:red"></form:errors><br/>
            </form:form>
            <div class="col-lg-12">
                <div class="box">
                    <header>
                        <div class="icons">
                            <i class="fa fa-ok"></i>
                        </div>
                        <h5>编辑资源信息</h5>

                        <div class="toolbar">
                            <ul class="nav">
                                <li>
                                    <div class="btn-group">
                                        <a class="accordion-toggle btn btn-xs minimize-box" data-toggle="collapse"
                                           href="#collapse3">
                                            <i class="fa fa-chevron-up"></i>
                                        </a>
                                        <button class="btn btn-xs btn-danger close-box">
                                            <i class="fa fa-remove"></i>
                                        </button>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </header>
                    <div id="collapse3" class="accordion-body collapse in body">
                        <form method="post" action="#" class="form-horizontal" id="inline-validate">
                            <div class="form-group">
                                <label class="control-label col-lg-4">父级资源</label>

                                <div class="col-lg-8">
                                    <input type="text" name="txtResourceParentId" readonly
                                           class="form-control col-lg-6">
                                    <input type="hidden" name="resourceParentId" id="resourceParentId">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4"></label>

                                <div class="col-lg-8">
                                    <a data-toggle="modal" data-original-title="Help" data-placement="bottom"
                                       data-target="#helpModal" class="btn btn-default btn-sm" href="/resource/gettree.do">
                                        <i class="">选择父级资源</i>
                                    </a>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">资源名称</label>

                                <div class="col-lg-8">
                                    <input type="text" id="resourceName" name="resourceName"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">菜单名称</label>

                                <div class="col-lg-8">
                                    <input type="text" id="resourceMenuName" name="resourceMenuName"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">资源链接</label>

                                <div class="col-lg-8">
                                    <input type="text" id="resourceUrl" name="resourceUrl"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">请求方法</label>

                                <div class="col-lg-8">
                                    <select multiple="multiple" size="5" name="resourceRequestMethod"
                                            class="form-control col-lg-6">
                                        <option value="">all</option>
                                        <option value="get">get</option>
                                        <option value="post">post</option>
                                        <option value="head">head</option>
                                        <option value="put">put</option>
                                        <option value="delete">delete</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">权重</label>

                                <div class="col-lg-8">
                                    <input type="number" value="0" id="priority" name="priority"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">图标</label>

                                <div class="col-lg-8">
                                    <input type="text" id="resourceIcon" name="resourceIcon"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-lg-4">是否生效</label>

                                <div class="col-lg-8">
                                    <input type="checkbox" id="status" name="status" value="1"
                                           class="form-control col-lg-6">
                                </div>
                            </div>
                            <div class=" form-group form-actions">
                                <span class="col-lg-4"></span>

                                <div class="col-lg-8">
                                    <input type="submit" value="提 交" class="btn btn-primary">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <!-- /.col-lg-12 -->
        </div>
    </jsp:body>
</t:master>


